package com.ruoyi.manager.controller;

import com.ruoyi.manager.mapper.TeacherAnalysisMapper;
import com.ruoyi.manager.service.TeachAnalysisService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;
import java.util.Map;

@RequestMapping("/manager/analysis")
@Controller
public class AnalysisController {

    @Autowired
    TeachAnalysisService teachAnalysisService;

    @RequestMapping("/teachAnalysisPage")
    public String toTeachAnalysisPage(){
        return "redirect:/analysis/teachAnalysis.html";
    }

    @ResponseBody
    @RequestMapping("/listClssesInfo")
    public List<Map<String,Object>> listClassesInfor(){
        return teachAnalysisService.listClassesInfor();
    }

    @ResponseBody
    @RequestMapping("/currentWeekStudentGradeClassify")
    public Map<String,Object> currentWeekStudentGradeClassify(){
        return teachAnalysisService.currentWeekStudentGradeClassify();
    }

    @ResponseBody
    @RequestMapping("/findExercisingClassAvgGrade")
    public List<Map<String, Object>> findExercisingClassAvgGrade(){
        return teachAnalysisService.findExercisingClassAvgGrade();
    }

    @ResponseBody
    @RequestMapping("/findExercisingTotalClassesTotalGradeAndAvgGrade")
    public Map<String, Object> findExercisingTotalClassesTotalGradeAndAvgGrade(){
        return teachAnalysisService.findExercisingTotalClassesTotalGradeAndAvgGrade();
    }

    @ResponseBody
    @RequestMapping("/findAllClassesStudentsCoreTaskCompleteRateLessThanForty")
    public Map<String,Object> findAllClassesStudentsCoreTaskCompleteRateLessThanForty(){
        return teachAnalysisService.findAllClassesStudentsCoreTaskCompleteRateLessThanForty();
    }

    @ResponseBody
    @RequestMapping("/listStudentCoreTaskCompleteRateLessForty")
    public List<Map<String,Object>> listStudentCoreTaskCompleteRateLessForty(){
        return teachAnalysisService.listStudentCoreTaskCompleteRateLessForty();
    }

    @ResponseBody
    @RequestMapping("/coreRateSubmit")
    public List<Map<String,Object>> coreRateSubmit(){
        return teachAnalysisService.coreRateSubmit();
    }


    @ResponseBody
    @RequestMapping("/classHomeworkAnalysis")
    public Map<String,Object> classHomeworkAnalysis(){
        return teachAnalysisService.classHomeworkAnalysis();
    }

    @ResponseBody
    @RequestMapping("/weekWorkNum")
    public List<Map<String,Object>> weekWorkNum(){
        return teachAnalysisService.weekWorkNum();
    }


    @ResponseBody
    @RequestMapping("/NumberOfProjectManagerEvaluations")
    public List<Map<String, Object>> NumberOfProjectManagerEvaluations(){
        return teachAnalysisService.NumberOfProjectManagerEvaluations();
    }

    @ResponseBody
    @RequestMapping("/ExhibitionOfEmploymentSpaceInEachProvince")
    public List<Map<String,Object>> ExhibitionOfEmploymentSpaceInEachProvince(){
        return teachAnalysisService.ExhibitionOfEmploymentSpaceInEachProvince();
    }


}
